package com.chixing.day07.AbstractDemo;

/**
 * 1.Account 作为父类:SavingAccount 与 CreditAccount有共有的属性和方法,所以将公共部分 抽离出来 放到令一个类中
 * 减少代码[沉余性]
 */
public abstract class Account {
    //存款
    public abstract void depoist();

    //取款
    public abstract void withdra();
}

class SavingAccount extends Account {
    @Override
    public void depoist() {

    }

    @Override
    public void withdra() {

    }
}

class CreditAccount extends Account {
    @Override
    public void depoist() {

    }

    @Override
    public void withdra() {

    }
}

class LoanAccount extends Account {
    @Override
    public void depoist() {

    }

    @Override
    public void withdra() {

    }
}
